Precision machine vision inspection systems (or “vision systems” for short) can be utilized to obtain precise dimensional measurements of inspected objects and to inspect various other object characteristics. Such systems may include a computer, a camera and optical system, and a precision stage that is movable in multiple directions so as to allow the camera to scan the features of a workpiece that is being inspected. One exemplary prior art system that is commercially available is the QUICK VISION® series of PC-based vision systems and QVPAK® software available from Mitutoyo America Corporation (MAC), located in Aurora, Ill. The features and operation of the QUICK VISION® series of vision systems and the QVPAK® software are generally described, for example, in the QVPAK 3D CNC Vision Measuring Machine User's Guide, published January 2003, and the QVPAK 3D CNC Vision Measuring Machine Operation Guide, published September 1996, each of which is hereby incorporated by reference in their entirety. This product, as exemplified by the QV-302 Pro model, for example, is able to use a microscope-type optical system to provide images of a workpiece at various magnifications, and move the stage as necessary to traverse the workpiece surface beyond the limits of any single video image. A single video image typically encompasses only a portion of the workpiece being observed or inspected, given the desired magnification, measurement resolution, and physical size limitations of such systems.
Machine vision inspection systems generally utilize automated video inspection. U.S. Pat. No. 6,542,180, (hereinafter “the '180 patent”) teaches various aspects of such automated video inspection and is incorporated herein by reference in its entirety. As taught in the '180 patent, automated video inspection metrology instruments generally have a programming capability that allows an automatic inspection event sequence to be defined by the user for each particular workpiece configuration. This can be implemented by text-based programming, for example, or through a recording mode which progressively “learns” the inspection event sequence by storing a sequence of machine control instructions corresponding to a sequence of inspection operations performed by a user, or through a combination of both methods. Such a recording mode is often referred to as “learn mode” or “training mode.” Once the inspection event sequence is defined in “learn mode,” such a sequence can then be used to automatically acquire (and additionally analyze or inspect) images of a workpiece during “run mode.”
The machine control instructions including the specific inspection event sequence (i.e., how to acquire each image and how to analyze/inspect each acquired image) are generally stored as a “part program” or “workpiece program” that is specific to the particular workpiece configuration. For example, a part program defines how to acquire each image, such as how to position the camera relative to the workpiece, at what lighting level, at what magnification level, etc. Further, the part program defines how to analyze/inspect an acquired image, for example, by using one or more video tools such as edge/boundary detection video tools.
Video tools (or “tools” for short) may be used manually to accomplish manual inspection and/or machine control operations. Their set-up parameters and operation can also be recorded during learn mode, in order to create automatic inspection programs, or “part programs.” Set-up parameters may typically be configured using various graphical user interface widgets and/or menus of the vision inspection system software. Such tools may include, for example, edge/boundary detection tools, autofocus tools, shape or pattern matching tools, dimension measuring tools, and the like. For example, such tools are routinely used in a variety of commercially available machine vision inspection systems, such as the QUICK VISION® series of vision systems and the associated QVPAK® software, discussed above.
Accuracies in the micron or sub-micron range are often desired in such systems. This is particularly challenging with regard to Z-height measurements. Z-height measurements (along the optical axis of the camera system) are generally derived from a “best focus” position, such as that determined by an autofocus tool. Determining a best focus position is a relatively complex process that generally depends on combining and/or comparing information derived from multiple images. Thus, the level of precision and reliability achieved for Z-height measurements is often less than that achieved for the X- and Y-measurement axes, where measurements are typically based on feature relationships within a single image.
A particular problem arises when determining a plurality of three-dimensional (3D) data points across the surface of a workpiece, and attempting to use the resulting 3D data points together to determine the shape or profile of the surface. A set of 3D data points may be referred to as “point cloud” data. Typically, a curve or surface is fit to the point cloud data. However, the Z-height accuracy and reliability may be poor for at least some of the 3D data points, for a number of reasons. As a first example, when the surface is strongly curved (e.g., the surface of an IC ball grid array solder ball), some parts of the surface are at an extreme angle of incidence, such that they return little light and are underexposed in the autofocus images. As a another example, some parts of the surface may be highly textured, such that they include a range of local Z heights that simply cannot be imaged or “autofocused” with an uncertainty that is less than their Z range. As a result, it is frequently necessary for a surface or curve fitting algorithm to deal with point cloud data that includes poor quality Z-height coordinates.
While there are many known algorithmic approaches for fitting point cloud data that includes poor quality Z-height coordinates, most of them rely simply on some method of weighting and/or rejected geometric outliers. Defining a geometric outlier is generally based on how far a point deviates from a current best fit curve or surface. There are many approaches to weighting or rejecting point cloud data points based on their distance from a current fit: Tukey's Biweight, Andrew's Sine, Huber, Welsch, Hampel, and others. These are all approaches to minimize the effect that outliers have on the final fit by adjusting the weight of each individual point based on distance from the current fit. In some algorithms, the weighting may be iteratively determined—that is, distance from a first surface determines a first point weighting, then using that point weighting the best fit surface is re-determined, and so on until a stable result is achieved. In some algorithms, the fitted curve or surface may be constrained based on predetermined design information. Certain literature on robust estimation (or fitting) can be found at http://en.wikipedia.org/wiki/Robust_statistics, as well as in U.S. Pre-Grant Publication Nos. 2005/0216237A1 and 2009/0103773A1.
However, because they are basically “blind” methods that simply treat geometric data statistically, the foregoing methods are at significant risk for eliminating valid data corresponding to localized defects, or having results influenced in a subtle way by low-reliability data that does not fall outside of predetermined geometric thresholds. Some systems for analyzing machine vision point cloud data simply live with these risks, and/or perform time-consuming data self-consistency checking and/or ad-hoc heuristic analysis in addition to simple geometric surface fitting. Other systems allow or require an operator to manually review the point cloud data and/or fitting results in order to influence the elimination of outliers (e.g., by manual rejection or acceptance, or the like). However, such systems retain a significant possibility for error and/or are time consuming, or both. The present disclosure is directed to providing systems and methods that overcome the foregoing and other disadvantages.